<template>
  <div>
    <el-form ref="form" :model="form" :rules="rules" class="login-box">
      <h3 class ="login-title">欢迎登录健康档案管理系统</h3>
      <el-form-item label="账号" prop="name">
        <el-input type="text" placeholder="请输入用户名" v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label="密码" prop="password">
        <el-input type="password" placeholder="请输入密码" v-model="form.password"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">登录</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
// @ is an alias to /src


export default {
  name: 'Login',
  data(){
    return{
      form: {
        name: '',
        password: ''
      }
    }
  },
  methods:{
    onSubmit(){
      this.$router.push("/menu");
    }
  }
}
</script>
<style scoped>
.login-box{
  width: 350px;
  margin: 120px auto;
  border: 1px solid #DCDFE6;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 30px #DCDFE6;
}
.login-title{
  text-align: center;
}
</style>